
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<%--<%@ page contentType="text/html;charset=UTF-8" language="java" %>--%>
<html>
<head>
    <title>流程查询</title>
    <meta charset="UTF-8">
    <%--<meta http-equiv="Content-Type" content="text/html; charset=utf-8 ? MYOA_CHARSET : htmlspecialchars($HTML_PAGE_CHARSET))?>" />--%>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <%--<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">--%>
    <link rel="stylesheet" type="text/css" href="../../css/workflow/m_reset.css">
    <link rel="stylesheet" type="text/css" href="../../css/workflow/work/workMonitor.css">
    <link rel="stylesheet" href="../../css/officialDocument/officialDocument.css">
    <link rel="stylesheet" type="text/css" href="../../lib/pagination/style/pagination.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/base.css" />
    <link rel="stylesheet" type="text/css" href="/css/base/base.css?20201106.1" />
    <link rel="stylesheet" href="/lib/layer/skin/default/layer.css">
    <link rel="stylesheet" type="text/css" href="../../css/workflow/work/handle.css"/>
    <%--<link rel="stylesheet" type="text/css" href="../../css/workflow/work/bootstrap.css">--%>
    <script>

        function getCookie(name)
        {
            var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
            if(arr=document.cookie.match(reg))
                return unescape(arr[2]);
            else
                return null;
        }

        var oHead = document.getElementsByTagName('HEAD').item(0);

        var oScript= document.createElement("script");
        var type = getCookie("language");
        oScript.type = "text/javascript";

        if(type){
            oScript.src="/js/Internationalization/"+type+".js";
        }else{
            oScript.src="/js/Internationalization/zh_CN.js";
        }
        oHead.appendChild( oScript);

    </script>
    <script type="text/javascript" src="/js/jquery/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="/js/base/tablePage.js"></script>
    <script src="/lib/layer/layer.js?20201106"></script>
    <script src="/js/base/base.js"></script>
    <script src="../../lib/laydate/laydate.js"></script>
    <script src="../../js/workflow/work/workform.js"></script>
    <%--<script src="/js/workflow/work/flowDiaryQuery.js"></script>--%>
    <script src="../../lib/pagination/js/jquery.pagination.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/jquery/jquery.cookie.js"></script>

    <style>
        input{
            float:none;
            border:1px solid #ccc;
        }
        .workMon {
            font-size: 22px;
            font-weight: normal;
            line-height: 45px;
            float: none;
            margin-top: 9px;
            font-size: 22px;
            color: #333;
        }
        .flowNum, .artNum, #user,#startTime,#endTime ,#IP{
            width: 100px;
            border-radius: 3px;
            height: 28px;
        }



        .sms-bg-static{
            background: #d2d2d2 url("/img/images/sms-static.png") no-repeat left center;
        }
        .sms-bg-static.active{
            background: #3691da url(/img/images/sms.png) no-repeat left center;
        }
        .email-bg-static{
            background: #d2d2d2 url(/img/images/email-static.png) no-repeat left center;
        }
        .email-bg-static.active{
            background: #3691da url(/img/images/email.png) no-repeat left center;
        }
        .sms-check, .email-check, .mobile-check{
            width: 88px;
            height: 30px;
        }
        .userSelectBtn:hover {
            background: url(../../img/userSelectBtnhover.png) no-repeat -3px -2px;
        }
        .layui-layer-btn-{
            /*border-top: 1px solid #d6d6d6;*/
            /*background-color: #f6f6f6;*/
        }
        .prcsName h1 {
            text-align: center;
            line-height: 35px;
        }
        .layui-layer-page .layui-layer-content {
            overflow-x: hidden !important;
        }
        .layui-layer-title{
            color: #fff;
            font-size: 16px;
            font-family: Microsoft yahei,Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;
            background:linear-gradient(to bottom,#2077c6,#2495df);
            FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0, startColorStr=#2077c6, endColorStr=#2495df);
            background: -ms-linear-gradient(top, #2077c6, #2495df);        /* IE 10 */
            background:-moz-linear-gradient(top, #2077c6, #2495df);/*火狐*/
            background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#2077c6), to(#2495df));  /* Safari 4-5, Chrome 1-9*/
            background: -webkit-linear-gradient(top, #2077c6, #2495df);   /*Safari5.1 Chrome 10+*/
            background: -o-linear-gradient(top, #2077c6, #2495df);  /*Opera 11.10+*/
        linear-gradient(to bottom, hsl(0, 80%, 70%), #2077c6); /* Standard syntax; must be last */
        }
        .xuanzhong1{
            left: 193px;
        }
        .work-prcs-title,.work-msg-title{
            background-color: #d6e7f8;
            color: #023964;
            font-size: 14px;
            position: relative;
        }
        .prcsName_chang{
            border: none;
            color:#fff;
            background: #3691da  url("../../../img/workflow/work/add_work/checked.png") no-repeat 20px center;
        }
        .user-tags{
            background: #fff;
        }
        .cytitle{
            position: absolute;
            left: 140px;
            font-size: 14px;
            color: #023964;
            top: 30px;
        }
        .feedbacktitle {
            position: relative;
            top: 3px;
            font-weight: bold;
            margin-left: 10px;
            color: #333333;
        }
        .feedbackcontent {
            margin-left: 23px;
            font-size: 15px;
            color: #333333;
        }
        .backinfo {
            width: 100%;
            height: 100px;
        }
        #destory, #reset {
            background: #00a0e9 !important;
            border-radius: 4px;
            color: #fff !important;
            padding: 3px 5px;
            margin: 5px 5px;
            cursor:pointer;
        }
        .pagediv .page-bottom-outer-layer table td{
            font-weight: normal;
            overflow: visible;
            white-space: normal;
            height: 40px;
            padding: 4px;
            box-sizing: border-box;
            text-overflow: clip;
            word-break:break-all;
            font-size: 10pt;
            text-align: left;
        }
    </style>
    <link rel="stylesheet" type="text/css" href="/css/commonTheme/${sessionScope.InterfaceModel}/commonTheme.css"/>
</head>
<body>
<div class="mainCon">
    <div class="header" style="background-color:white ">
        <div class="title">
            <img src="/img/commonTheme/${sessionScope.InterfaceModel}/gongzuojiankong.png" alt="" style="margin-bottom:10px;">
            <h3 style="display:inline;" class="workMon">流程日志</h3>
        </div>
    </div>
    <div class="section">
        <div class="selectNav" style="padding-top: 63px;padding-bottom: 13px">
        </div>
        <div style="margin:-20px 0px 15px 0px;">
            <label style="margin-left: 20px">操作类别：</label>
            <select name="type" id="type">
                <option value="0">请选择</option>
                <option value="1">新建表单</option>
                <option value="2">保存表单</option>
                <option value="3">新建流程</option>
                <option value="4">新建步骤</option>
                <option value="5">可写字段</option>
                <option value="6">保密字段</option>
                <option value="7">必填字段</option>
                <option value="8">经办权限</option>
                <option value="9">智能选人</option>
                <option value="10">流转设置</option>
                <option value="11">编辑流程步骤</option>
                <option value="12">删除流程</option>
                <option value="13">删除步骤</option>
                <option value="14">修改权限（管理权限）</option>
                <option value="15">删除权限（管理权限）</option>
                <option value="16">导入流程</option>
                <option value="17">清空流程</option>
                <option value="18">编辑表单</option>
                <option value="19">导入表单</option>
                <option value="20">删除表单</option>
                <option value="21">编辑流程</option>
                <option value="22">删除连线</option>
                <option value="23">节点连线</option>
            </select>
            <label style="margin-left: 20px">发生时间：</label>
            <input type="text" id="startTime" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
            <span>~</span>
            <input type="text" id="endTime" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
            <label style="margin-left: 20px">操作人：</label>
            <input type="text" id="user" name="userId" user_id="" >
            <a href="javascript:;" id="addUser" style="margin-left: 10px;color: #2b7fe0;"><fmt:message code="notice.th.chose"/></a>
            <a href="javascript:;" id="clearUser" style="color: #2b7fe0;margin-left: 5px;"><fmt:message code="global.lang.empty"/></a>
            <label style="margin-left: 20px">IP地址：</label>
            <input type="text" id="IP" name="IP" >
            <button id="query" style="margin-top: 5px;margin-left: 13px">
                <img src="../../img/workflow/worksearch.png" style="margin-right: 2px;margin-left:5px;margin-bottom: 1px;">
                <span style="margin-right: 5px;"><fmt:message code="global.lang.query"/></span>
            </button>
        </div>
    </div>

    <div id="pagediv">

    </div>
</div>
</body>
</html>
<script>
    var eventas;
    var pageObj=$.tablePage('#pagediv','1220px',[
        // {
        //     width:'80px',
        //     title:'流水号',
        //     name:'flowId',
        // },
        {
            width:'100px',
            title:'操作人',
            name:'userName',
        },
        {
            width:'110px',
            title:'操作类别',
            name:'type',
            selectFun:function (flowName,obj) {

                return '<span style="color: black" title="'+obj.type+'" >'+$('#type option[value="'+obj.type+'"]').text()+'</span>';
            }
        },
        {
            width:'70px',
            title:'步骤号',
            name:'id',
        },
        {
            width:'100px',
            title:'步骤名称',
            name:'flowName',
        },
        {
            width:'110px',
            title:'日志时间',
            name:'time',
            selectFun:function (time,obj) {
                return new Date(time).Format('yyyy-MM-dd hh:mm:ss')
            }
        },
        {
            width:'110px',
            title:'地址',
            name:'ip',
        },
        {
            width:'350px',
            title:'内容',
            name:'content',
            selectFun:function (obj) {
                return '<span style="color:#333;" title="'+obj+'">'+obj+'</span>'
            }
        }
    ],function (me){
        me.data.pageSize =20;
        me.init('/LogController/selectAllLogByPageAndTJ'
            // [
            // {name:'删除',fn:function(obj){
            //     return 1;
            // }}]
        )

        // $('#query').click(function () {
        //     var user=$('#user').val();
        //     me.data.userId = user;
        //     me.init("/LogController/selectAllLogByPageAndTJ");
        // });
        // $('#query').click(function () {
        //     if($('#startTime').val()!=""&&$('#endTime').val()!=""){
        //         me.data.startTime=$('#startTime').val();
        //         me.data.endTime=$('#endTime').val();
        //     }else{
        //         me.data.startTime=undefined
        //         me.data.endTime=undefined
        //     }
        //     me.init("/LogController/selectAllLogByPageAndTJ");
        // })
    })
    $("#addUser").on("click",function(){
        user_id='user';
        $.popWindow("../../common/selectUser?0");
    });
    $("#clearUser").on("click",function(){
        $("#user").val("");
        $("#user").attr('user_id','');
    })
    $('#query').click(function () {
        var ip=$('#IP').val();
        var user=$('#user').attr('user_id');
        pageObj.data.ip = ip;
        pageObj.data.userId = user;
        pageObj.data.type=$("#type").val();
        pageObj.data.startTime=$('#startTime').val();
        pageObj.data.endTime=$('#endTime').val();

        pageObj.init();
    });

</script>